#ifndef UTILADB_H
#define UTILADB_H

#include <QString>
#include <QProcess>

typedef enum _E_ADB_RET{
    E_ADB_OK,
    E_ADB_NO_DEVICE,
    E_ADB_MULTI_DEVICE,
    E_ADB_OTHERS,
} E_ADB_RET;

class UtilADB: public QObject
{
    Q_OBJECT
public:
    UtilADB();
    void CallADB(const QString &args, QString &result);
    void CallADBSync(const QString &args);
    E_ADB_RET PrepareADB(int *connectCnt);

signals:
    void signal_adbCmdSync(QString strSync);

private:
    QString m_returnStr;
    int DevicesCount(QString &text);

private slots:
    void on_readOutput();
};

#endif // UTILADB_H
